import Peach from '@wattjs/peach'
import WattTool from '@wattjs/tool'

export default defineNuxtRouteMiddleware ((to, from, next) => {
  console.log('router middleware')
  const { name, path } = to

  if (process.client && process.env.NODE_ENV === 'production') {
    Peach.getInstance().logPage({
      name,
      path
    })
  }
})
